
<%@ page import="payroll.webapp.EmpSalaryDefinition" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'empSalaryDefinition.label', default: 'EmpSalaryDefinition')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/adminPage')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${empSalaryDefinitionInstance}">
            <div class="errors">
                <g:renderErrors bean="${empSalaryDefinitionInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${empSalaryDefinitionInstance?.id}" />
                <g:hiddenField name="version" value="${empSalaryDefinitionInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="empid"><g:message code="empSalaryDefinition.empid.label" default="Empid" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'empid', 'errors')}">
                                    <g:textField name="empid" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'empid')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="effectiveDate"><g:message code="empSalaryDefinition.effectiveDate.label" default="Effective Date" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'effectiveDate', 'errors')}">
                                    <g:datePicker name="effectiveDate" precision="day" value="${empSalaryDefinitionInstance?.effectiveDate}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="basicSalary"><g:message code="empSalaryDefinition.basicSalary.label" default="Basic Salary" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'basicSalary', 'errors')}">
                                    <g:textField name="basicSalary" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'basicSalary')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="monthlyIncentives"><g:message code="empSalaryDefinition.monthlyIncentives.label" default="Monthly Incentives" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'monthlyIncentives', 'errors')}">
                                    <g:textField name="monthlyIncentives" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'monthlyIncentives')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="houseAllowance"><g:message code="empSalaryDefinition.houseAllowance.label" default="House Allowance" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'houseAllowance', 'errors')}">
                                    <g:textField name="houseAllowance" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'houseAllowance')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="otherAllowance"><g:message code="empSalaryDefinition.otherAllowance.label" default="Other Allowance" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'otherAllowance', 'errors')}">
                                    <g:textField name="otherAllowance" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'otherAllowance')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="_13monthSalary"><g:message code="empSalaryDefinition._13monthSalary.label" default="13month Salary" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: '_13monthSalary', 'errors')}">
                                    <g:textField name="_13monthSalary" value="${fieldValue(bean: empSalaryDefinitionInstance, field: '_13monthSalary')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="totalSalary"><g:message code="empSalaryDefinition.totalSalary.label" default="Total Salary" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'totalSalary', 'errors')}">
                                    <g:textField name="totalSalary" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'totalSalary')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="annualLeaves"><g:message code="empSalaryDefinition.annualLeaves.label" default="Annual Leaves" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'annualLeaves', 'errors')}">
                                    <g:textField name="annualLeaves" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'annualLeaves')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="sickLeaves"><g:message code="empSalaryDefinition.sickLeaves.label" default="Sick Leaves" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'sickLeaves', 'errors')}">
                                    <g:textField name="sickLeaves" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'sickLeaves')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="salCalcTypes"><g:message code="empSalaryDefinition.salCalcTypes.label" default="Sal Calc Types" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'salCalcTypes', 'errors')}">
                                    <g:select name="salCalcTypes.id" from="${payroll.webapp.SalaryCalcTypes.list()}" optionKey="id" value="${empSalaryDefinitionInstance?.salCalcTypes?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="insuranceNumber"><g:message code="empSalaryDefinition.insuranceNumber.label" default="Insurance Number" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'insuranceNumber', 'errors')}">
                                    <g:textField name="insuranceNumber" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'insuranceNumber')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="housingInsuranceNumber"><g:message code="empSalaryDefinition.housingInsuranceNumber.label" default="Housing Insurance Number" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'housingInsuranceNumber', 'errors')}">
                                    <g:textField name="housingInsuranceNumber" value="${fieldValue(bean: empSalaryDefinitionInstance, field: 'housingInsuranceNumber')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="employee"><g:message code="empSalaryDefinition.employee.label" default="Employee" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: empSalaryDefinitionInstance, field: 'employee', 'errors')}">
                                    <g:select name="employee.id" from="${payroll.webapp.Employee.list()}" optionKey="id" value="${empSalaryDefinitionInstance?.employee?.id}"  />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
